package com.etop.weibo.dao;

import java.util.List;
import java.util.Map;

/**
 *
 * @author jansing
 */
public interface IBaseDao<T> {

    public void add(T obj);

    public void update(T obj);

    public void updateByHQL(Map<String, Object> params, Map<String, Object> condition);

    public void delete(int id);

    public void deleteByHQL(Map<String, Object> condition);

    public T load(int id);

    public T loadByHQL(Map<String, Object> condition);

    public Object[] loadByHQL(List<String> params, Map<String, Object> condition);

    public List<T> list();

    public List<T> listAndSort(String sort);

    public List<T> listByHQL(Map<String, Object> condition);

    public List<T> listByHQLAndSort(Map<String, Object> condition, String sort);

}
